package com.blockchain.securewallet.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.TouchDelegate;
import android.view.View;
import android.widget.ImageButton;

import butterknife.BindView;
import butterknife.ButterKnife;

import com.blockchain.securewallet.R;
import com.blockchain.securewallet.utils.Logger;
import com.blockchain.securewallet.utils.ToastUtils;
import com.blockchain.securewallet.utils.UIHelper;

/**
 * Created by Chain-Cloud on 2018/5/14.
 */

public class BaseActivity extends FragmentActivity {

    //像素
    public static int mScreenWidth;
    public static int mScreenHeight;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        //获取当前屏幕宽高
        DisplayMetrics metric = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(metric);
        mScreenWidth = metric.widthPixels;
        mScreenHeight = metric.heightPixels;

        //Logger.ds("> width: " + mScreenWidth + "\t\theight: " + mScreenHeight);
    }

    @Override
    protected void onStart() {
        super.onStart();
        View btnBack = getWindow().getDecorView().findViewById(R.id.btn_back);
        //扩大标题栏左上角箭头的点击范围
        UIHelper.expandViewTouchDelegate(btnBack, 60, 60, 60, 120);
    }

}
